Blitz (203/640)

From:Tony Rolfe
Date:2 Sep 99 at 06:27:41
Subject:Enforcer Hits

I've just started using Enforcer to test my Motelmanager and have
encountered a W*I*E*R*D hit.

If I click into a blank area of the Workbench screen, or double-click
an Icon on the workbench screen I get a couple of Long Reads from
zero. Even if I've just started my machine from Cold!!

Anyway, that's not -my- problem.

My problem is, why does the "Program$ =" line below give a hit?
Someone suggested this code to get my current program name, but I get
one read from zero. Looking at the Task Newtype, I can't see
anything which looks like a pointer to a program name.

Anyway, here's the offending code.

If FromCLI
*stringbuffer.l = AllocMem_(255, 0)
If GetProgramName_(*stringbuffer,255)
Program$ = Peek$(*stringbuffer)
EndIf
FreeMem_ *stringbuffer,255
Else
Program$ = Peek$(Peek.l(FindTask_(0)+$B0)+4) ;<---
EndIf

Thanks in advance



Tony Rolfe
Amiga 2000, 68030/25, 1+8Mb
www.shoalhaven.net.au/edgewater

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie